/*
 * @Description:
 * @Version: 2.0
 * @Author: Xing
 * @Date: 2020-08-13 17:40:14
 * @LastEditors: Xing
 * @LastEditTime: 2020-08-14 15:35:34
 */
import http from './http';

/**
 * 登录
 */
function loginApi(data) {
  return new Promise((resolve, reject) => {
    http('post', '/admin/login', data).then(
      (res) => {
        resolve(res);
      },
      (error) => {
        console.log('网络异常~', error);
        reject(error);
      }
    );
  });
}

export { loginApi };
